//认证的请求封装
import request from "@/utils/http.ts"

//1.添加认证
export const addVerificationAPI = (data: any) => {
    return request({
        url: 'verification/addVerification',
        method: 'post',
        data: {
            verificationType: data.verificationType,
            verificationCreaterId: data.verificationCreaterId,
            verificationCreater: data.verificationCreater,
            verificationStatus: data.verificationStatus,
            verificationFileList: data.verificationFileList,
            verificationRemarks: data.verificationRemarks,
        }
    })
}

//2.分页获取认证信息
export const getVerificationPageAPI = (data: any) => {
    return request({
        url: 'verification/getVerificationPage',
        method: 'post',
        data: {
            pageCurrent: data.pageCurrent,
            pageSize: data.pageSize,
            verificationType: data.verificationType,
            verificationStatus: data.verificationStatus,
            searchName:data.searchName,
        }
    })
}

//3.查看认证详情
export const getVerificationDetailAPI = (data: any) => {
    return request({
        url: 'verification/getVerificationDetail',
        method: 'post',
        params: {
            verificationId: data.verificationId,
        }
    })
}

//4.更新认证信息
export const updateVerificationAPI = (data: any) => {
    return request({
        url: 'verification/updateVerification',
        method: 'post',
        data: {
            verificationId: data.verificationId,
            verificationStatus: data.verificationStatus,
            verificationPassDate: data.verificationPassDate,
            verificationRefuse: data.verificationRefuse,
        }
    })
}
